package com.huike.xingxing.ui;

import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.annotation.Nullable;

@SuppressLint("AppCompatCustomView")
public class Textmarquee extends TextView {
    public Textmarquee(Context context) {
        this(context,null);
    }

    public Textmarquee(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs,-1);
    }

    public Textmarquee(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        start();
    }

    private void start() {
        this.setEllipsize(TextUtils.TruncateAt.MARQUEE);
        this.setSingleLine(true);
        this.setMarqueeRepeatLimit(-1);
    }


    @Override
    public boolean isFocused() {
       return  true;
    }



}
